<?php
namespace Home\Controller;
use Think\Controller;
class ButtonController extends Controller {
	public function change(){
		$type = $_REQUEST["type"];
		if($type == "yes"){
			$value = ["code"=>1];
		}elseif($type == "no"){
			$value = ["code"=>0];
		}
		
		header("Content-Type: text/json");
		die(json_encode($value));
	}
}